package demo1;

public class Test {
    public static void main(String[] args) {
        Cycle cycle=new Cycle();
        Flower flower=new Flower();

        Shape[]shapes={cycle,cycle,flower,flower};
        for(Shape shape:shapes)
        {
            shape.draw();
        }
        Shape shape=new Flower();//向上转型
    }
}
